<?php
function callmenu($info,$cate_parent=0,$text="--",$select=0){
	foreach($info as $k=>$value){
		if($value['cate_parent'] == $cate_parent){
			$id=$value['cate_id'];
			if($select != 0 && $id == $select){
				echo "<option value='$value[cate_id]' selected='selected'>".$text.$value['cate_title']."</option>";
			}else{
				echo "<option value='$value[cate_id]'>".$text.$value['cate_title']."</option>";
			}
			unset($data[$k]);
			callmenu($info,$cate_id,$text."--",$select);
		}
	}
}

?>